1. Field of the Invention
The present invention relates to a technique of properly setting an ROI region and/or a tile in an electronic camera which executes image compression.
2. Description of the Related Art
In December 1999, a committee draft (CD) of an image compression algorithm of JPEG2000 was made, finalizing the main technical contents.
Image compression processing of the JPEG2000 will be outlined below.
(1) Color Coordinate Transformation
An inputted image is subjected to a color coordinate transformation as required.
(2) Tile Division
The inputted image is divided into plural rectangular regions (each hereinafter referred to as a tile) as required. The respective tiles are independently subjected to subsequent coding processing.
(3) Wavelet Transform
The inputted image is subjected to a discrete wavelet transform in two vertical and horizontal directions and frequency-decomposed into plural subbands (1LL, 1LH, 1HL, 1HH). Among these subbands, 1LL containing a direct-current component is further subjected to the discrete wavelet transform and frequency-decomposed into plural subbands (2LL, 2LH, 2HL, 2HH).
By recursively repeating the discrete wavelet transform as described above, image data is decomposed into subbands.
(4) Quantization
Wavelet transform coefficients are quantized by quantization step widths set for each subband. The quantization step is set to “1” in lossy/lossless unified processing. In this case, in lossy compression, lower N bit planes are discarded in a post-process. This discarding processing is equivalent to the quantization step of the N-th power of 2.
(5) Bit Modeling
The quantized wavelet transform coefficients are divided into coding blocks of a fixed size (for example, 64×64) within each subband. Transform coefficients within each of the coding blocks are divided into sign bits and absolute values, and thereafter, the absolute values are distributed to natural binary bit planes. The bit planes thus constructed are coded in order from the upper bit plane via three coding passes (Significance pass, Refinement pass, Cleanup pass). Incidentally, the sign bits are coded immediately after the most significant bits of the corresponding absolute values have appeared on the bit planes.
(6) ROI (Region of Interest) Coding
It is a function of allocating a certain amount of information preferentially to a selected partial region on an image (hereinafter referred to an ROI region) to improve the decoded image quality of the ROI region. More specifically, the quantized transform coefficients located in the ROI region are shifted upward by S bits. As a result, the ROI region is shifted to the upper bit planes, and coded with a higher priority than any bit of a non-ROI region.
According to a max shift method, the bit shift number S is set to be larger than the digit number of the most significant bit in the non-ROI region. Therefore, non-zero transform coefficients of the ROI region always have values equal to or more than the S-th power of 2. Hence, at the time of decoding, the transform coefficients of the ROI region can be easily restored by selectively shifting down quantized values equal to or more than the S-th power of 2.
(7) Arithmetic Coding
The coded data is further subjected to arithmetic coding using a MQ coder.
(8) Bit Stream Formation
A bit stream is formed by arranging the coded data of the inputted image in a predetermined order (for example, SNR progressive).
In addition, regarding JPEG2000, the following Patent Document 1 Japanese Unexamined Patent Application Publication No. 2002-176650 filed in Japan) is known. Patent Document 1 discloses a technique of setting degradation of the image quality of the non-ROI region to an appropriate extent by adjusting the area of the ROI region.
At setting the ROI region and the tile as above, it is desirable that they be set so as to include an important portion on a screen. However, with an electronic camera, a user needs to concentrate on photographing. Therefore, it is desirable that the user can easily and rapidly set the ROI region and the tile in the electronic camera.